<?php
/**
 * Pert Library
 * Test
 * UploadedImage Class
 *
 * @author	Emre Hasegeli <hasegeli@gmail.com>
 * @license	GNU General Public License v3
 */

namespace Pert;

require '../File.php';

require '../Image.php';

require '../UploadedFile.php';

require '../UploadedImage.php';

if(isset($_POST['Submit']))
{
	try
	{
		$file = new UploadedImage('File');

		$file = $file->Move('/home/hasegeli/deneme/');
	}
	catch(FileUploadException $e)
	{
		$exception = $e->getMessage();
	}
} ?>

<html>
	<head>
		<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8" />

		<title>
			Sample
		</title>
	</head>
	<body>
		<form action="#devam" enctype="multipart/form-data" method="POST">

<?php if(isset($exception))
	echo $exception; ?>

			<input type="hidden" name="MAX_FILE_SIZE" value="900000" />
			<input type="file" name="File" />
			<input type="submit" name="Submit" value="Submit" />
		</form>
	</body>
</html>